package com.pubinfo.passbook.common.model.bo.passbook.medical;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import java.io.Serializable;
import java.util.List;

@Data
@NoArgsConstructor
@XmlAccessorType(XmlAccessType.FIELD)
public class EInvoiceData {
  
  @ApiModelProperty("票面明细信息")
  @XmlElement(name = "Details")
  private Details Details;
  
  @ApiModelProperty("辅助明细信息")
  @XmlElement(name = "AuxDetails")
  private AuxDetails AuxDetails;
  
  @ApiModelProperty("票面基本信息")
  @XmlElement(name = "Main")
  private Main Main;
  
  @Data
  public static class Details implements Serializable {
    
    @ApiModelProperty("项目")
    @XmlElement(name = "Item")
    private List<Item> Item;
    
    @Data
    public static class Item implements Serializable {
      
      @ApiModelProperty("项目编码")
      @XmlElement(name = "ItemCode")
      private String ItemCode;
      
      @ApiModelProperty("明细信息扩展")
      @XmlElement(name = "ItemExt")
      private ItemExt ItemExt;
      
      @ApiModelProperty("数量")
      @XmlElement(name = "ItemQuantity")
      private String ItemQuantity;
      
      @ApiModelProperty("项目名称")
      @XmlElement(name = "ItemName")
      private String ItemName;
      
      @ApiModelProperty("金额")
      @XmlElement(name = "ItemAmount")
      private Double ItemAmount;
      @ApiModelProperty("单位")
      @XmlElement(name = "ItemUnit")
      private String ItemUnit;
      @ApiModelProperty("标准")
      @XmlElement(name = "ItemStd")
      private String ItemStd;
      
      @Data
      public static class ItemExt implements Serializable {
        
        @ApiModelProperty("自费金额")
        @XmlElement(name = "ItemAmountSelf")
        private Double ItemAmountSelf;
        
        @ApiModelProperty("自费比例")
        @XmlElement(name = "ItemAmountPercent")
        private Double ItemAmountPercent;
        
        @ApiModelProperty("项目种类")
        @XmlElement(name = "ItemType")
        private String ItemType;
        
        @ApiModelProperty("收费类别 01 诊查费 02 检查费 03 化验费 04 治疗费 05 手术费 06 材料费 07 西药费 08 中草药费 09 中成药费 10 药事服务费 11 床位费 12检验费 13 输血费 14 护理费 901 自定义内容 903 自定义内容 904 自定义内容 905 自定义内容 99 其他")
        @XmlElement(name = "ItemAmountType")
        private String ItemAmountType;
        
        @ApiModelProperty("项目单价")
        @XmlElement(name = "ItemAmountPrice")
        private Double ItemAmountPrice;
        
        @ApiModelProperty("明细分组标识 （大类分类标识）")
        @XmlElement(name = "ItemAmountGrp")
        private String ItemAmountGrp;
        
      }
    }
  }
  
}
    
